from page import Page
from selenium.webdriver.common.by import By


class MovieInfoPage(Page):

    @property
    def remove_movie_button(self):
        return self.driver.find_element_by_xpath(".//a/img[@title='Remove']/..")

    @property
    def movie_title(self):
        return self.driver.find_element_by_xpath(".//div[@class='maininfo_full']/h2")

    @property
    def remove_alert(self):
        return self.driver.find_element_by_xpath(".//div[@class='maininfo_full']/h2")

    @property
    def is_this_page(self):
        return self.is_element_visible((By.XPATH, ".//a/img[@title='Edit']"))
